#include <iostream>
using namespace std;
int main()
{
	int t;
	while(cin>>t){
		for(int i=0;i<t;i++){
			long long h;
			cin>>h;
			if(h<=10)cout<<1<<endl;
			else if(h%5==0)cout<<h/5-1<<endl;
			else cout<<h/5<<endl;
		}
	}
}
